#include <iostream>

namespace CERT_FILE_PTR_DEREF {
	namespace bad {
	
		int main()
		{

			FILE* pf1;
			FILE* pf2;
			FILE f3 = *pf2;
			pf2 = pf1;

			if (fputs("Hello, World!\n", &f3) == EOF) {

			}
			return 0;
		}
	}

	namespace good {
		int main()
		{

			FILE* pf1;
			FILE* pf2;
			FILE* f3 = pf2;
			pf2 = pf1;

			if (fputs("Hello, World!\n", &f3) == EOF) {
			}
			return 0;

		}
	}

}